<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Configure extends Admin_Controller {
	
	function __construct()
	{
		parent::__construct('admin');
		$this->load->model('settings');
	}
	
	public function index()
	{
		$vData = $this->settings->get();
		
		$data = array(
			'content' => $this->load->view('admin/settings', $vData, true)
		);
		
		$this->getPage($data);
	}

	public function save()
	{
		if (!empty($_POST))
			$this->settings->save($_POST);
		redirect('/admin/configure');
	}
}
?>